Skip to content

Propagate cancellation token in async Merge - #880

Merged
FreeApophis merged 2 commits into
polyadic:mainfrom
wxxb789:async-merge-cancellation
Sep 15, 2026
Merged

FreeApophis merged 2 commits into
polyadic:mainfrom
wxxb789:async-merge-cancellation

Conversation

@wxxb789

@wxxb789 wxxb789 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Merge obtains its enumerators and materializes the initial list without the token coming from await foreach, so a cancellation is never observed by the source sequences.

Interleave had the same problem and was fixed in 8f587ac, this applies the same plumbing to Merge.

The added test fails on main and passes with the fix.

`Merge` created its enumerators and materialized the initial list without
the token from `await foreach`, so cancellation was not observed by the
source sequences. `Interleave` already plumbs the token this way.
@FreeApophis
FreeApophis enabled auto-merge August 31, 2026 15:59
@FreeApophis
FreeApophis merged commit 133ba5b into polyadic:main Sep 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants